package cn.itcast.classSM.dao;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.classSM.domain.MainCheckMessage;

public interface TeacherRepository extends JpaRepository<MainCheckMessage, Integer>,JpaSpecificationExecutor<MainCheckMessage>{

	@Query(value="from MainCheckMessage mcm where mcm.mcmClazz.cid = ? and mcm.mcmCheckMessage.cmid = ?")
	List<MainCheckMessage> findByTimeAndClazz(Integer classMessage, Date date);

	@Query(value="from MainCheckMessage mcm where mcm.mcmCheckMessage.cmid = ?")
	List<MainCheckMessage> findByTime(Date date);

}
